package com.baobao_jk.tutorialmod;

import com.baobao_jk.tutorialmod.init.ModRecipes;
import com.baobao_jk.tutorialmod.proxy.CommonProxy;
import com.baobao_jk.tutorialmod.tabs.TutorialmodTab;
import com.baobao_jk.tutorialmod.util.Reference;

import com.baobao_jk.tutorialmod.world.ModWorldGen;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION) //mod注释
public class Main {

    public static final CreativeTabs tutorialtab = new TutorialmodTab("tutorialtab"); //创建一个新的tab标签栏

    @Instance
    public static Main instance; //新建一个instance

    @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.COMMON_PROXY_CLASS)
    public static CommonProxy proxy; //添加代理

    @EventHandler
    public static void PreInit(FMLPreInitializationEvent event)
    {
    }

    @EventHandler
    public static void Init(FMLInitializationEvent event)
    {
        GameRegistry.registerWorldGenerator(new ModWorldGen(), 3);
        ModRecipes.init();
    }

    @EventHandler
    public static void PostInit(FMLPostInitializationEvent event)
    {

    }
}
